﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="user.aspx.cs" Inherits="HY.WEB.sys.user" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div >
    
        <ext:PageManager ID="PageManager1" runat="server" />
<ext:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
ShowBorder="false" EnableBackgroundColor="true">
<Rows>
<ext:FormRow ID="FormRow1" runat="server">
<Items>

<ext:DropDownList ID="ddlfiled" runat="server" Label="查询字段"  >
</ext:DropDownList>

<ext:DropDownList ID="ddlwhere" runat="server" Label="查询条件"  >
</ext:DropDownList>

<ext:TwinTriggerBox ID="txt" runat="server" ShowLabel="false" EmptyText="关键字"
 Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchMessage_Trigger2Click"
　OnTrigger1Click="ttbSearchMessage_Trigger1Click">
</ext:TwinTriggerBox>

    <ext:Button ID="btnSearch" Icon="Zoom" runat="server"  Text="高级查询">
    </ext:Button>
</Items>
</ext:FormRow>

</Rows>
</ext:Form>


            <ext:Grid ID="Grid1" Title="员工档案表"     PageSize="15" ShowBorder="true" ShowHeader="true" AutoHeight="true" AllowPaging="true"
        runat="server" EnableCheckBoxSelect="True"  DataKeyNames="sid,lgid"
        OnPageIndexChange="Grid1_PageIndexChange" EnableRowNumber="True" OnSort="Grid1_Sort" AnchorValue="100% -36px">

         <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:Button ID="btnNew" Text="新增数据" Icon="Add" EnablePostBack="false" runat="server">
                    </ext:Button>
                    <ext:Button ID="btnDelete" Text="删除选中项" Icon="Delete" OnClick="btnDelete_Click" runat="server">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Columns>
            <ext:TemplateField Width="60px">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:BoundField Width="100px" DataField="lgid" DataFormatString="{0}" SortField="lgid" HeaderText="账号" />
            <ext:BoundField Width="100px" DataField="Major" DataFormatString="{0}" SortField="user_name" HeaderText="所学专业" />
          
            <ext:HyperLinkField Width="100px" DataToolTipField="user_name" DataTextField="user_name"  SortField="user_name" HeaderText="姓名" 
            DataNavigateUrlFields="Major"
                 DataNavigateUrlFormatString="http://gsa.ustc.edu.cn/search?q={0}"
                DataNavigateUrlFieldsEncode="true" Target="_blank" ExpandUnusedSpace="True" />
          
            <ext:TemplateField Width="60px" HeaderText="性别">
                <ItemTemplate>
                    <%-- Container.DataItem 的类型是 System.Data.DataRowView 或者用户自定义类型 --%>
                    <%--<asp:Label ID="Label2" runat="server" Text='<%# GetGender(DataBinder.Eval(Container.DataItem, "Gender")) %>'></asp:Label>--%>
                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("sex") %>'></asp:Label>
                </ItemTemplate>
            </ext:TemplateField>

              <ext:BoundField Width="60px" DataField="birthday" DataFormatString="{0:yyyy-MM-dd}" HeaderText="出生日期" />
            <ext:BoundField Width="60px" DataField="inday" DataFormatString="{0:yyyy-MM-dd}" HeaderText="入职日期" />
              <ext:BoundField Width="60px" DataField="outday" DataFormatString="{0:yyyy-MM-dd}" HeaderText="离职日期" />
            <ext:CheckBoxField Width="60px" RenderAsStaticField="true" DataField="inout" HeaderText="是否在职" />
            <ext:CheckBoxField Width="60px" RenderAsStaticField="true" DataField="status" HeaderText="是否有效" />
            <ext:BoundField Width="60px"  DataField="school" HeaderText="毕业学校" />

          
         <ext:WindowField ColumnID="myWindowField" Width="60px" WindowID="Window1" HeaderText="窗口列"
                Icon="TableEdit" ToolTip="编辑" DataTextFormatString="{0}" DataIFrameUrlFields="sid"
                DataIFrameUrlFormatString="grid_iframe_window.aspx?sid={0}" DataWindowTitleField="user_name"
                DataWindowTitleFormatString="编辑 - {0}" />
            <ext:TemplateField HeaderText="">
                <ItemTemplate>
                    <a href="<%# GetEditUrl(Eval("sid"), Eval("user_name")) %>">
                        编辑</a>
                </ItemTemplate>
            </ext:TemplateField>
        </Columns>
    </ext:Grid>
           <ext:Window ID="Window1" Title="编辑" Popup="false" EnableIFrame="true" runat="server"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" IFrameUrl="about:blank"
        OnClose="Window1_Close" Target="Top" IsModal="True" Width="750px" Height="450px">
    </ext:Window>
    </div>
    </form>
</body>
</html>
